package day21;

import java.util.Collections;
import java.util.Comparator;
import java.util.Set;

/**
 *
 * StoreStudentInfo.java
 * @author wangbiao<br/>
 *         email:785497344@qq.com
 * @description 把从键盘录入的学生成绩信息存入到文件中，格式：name,100,100,100
 * 				并按照总分的大小排序
 * @since 1.0.0
 * @date 2013-7-1下午10:45:19
 *
 */
public class StoreStudentInfo {

	public static void main(String[] args) {
		//默认的强制按反序排序
		Comparator<Student> cmp = Collections.reverseOrder();
		//默认顺序排序
		//Set<Student> students = StudentUtils.getStudentList();
		Set<Student> students = StudentUtils.getStudentList(cmp);
		StudentUtils.writeToFile(students);
	}
}
